package com.sea.supply.service;



import com.sea.supply.entity.Receive;
import com.sea.supply.entity.WareProduce;
import org.apache.ibatis.annotations.Param;

import java.io.InputStream;
import java.util.List;

/**
 * @author 陈鸿飞
 */
public interface WareProduceService {
    /**
     * 新增收货记录
     * @param wareProduce
     * @return
     */
    int save(WareProduce wareProduce);

    /**
     * 导入国内仓收货SKU
     * @param inputStream
     * @param fileName
     * @return
     * @throws Exception
     */
    void importSku(InputStream inputStream, String fileName, String userRealName) throws Exception;
    /**
     * 查询可接收数量
     * @param wareProduce
     * @return
     */
    WareProduce findReceiveNumber(WareProduce wareProduce);
    /**
     * 条件查询
     * @param wareProduce
     * @return
     */
    List<WareProduce> findByCnd(WareProduce wareProduce);

    List<WareProduce> getDistributeNumber(String receiveSku,String receiveChannelName);
    /**
     * 更新占有量
     * @param useNumber
     * @param id
     * @return
     */
    int updateUseNumber(Integer useNumber,Integer id);

    WareProduce findById(Integer id);

    /**
     * 查询可接收数量
     * @param receiveSku
     * @param receiveChannelName
     * @return
     */
    Integer getDistributeNumberBySkuChannel(String receiveSku,String receiveChannelName);

    /**
     * 查询指定
     * @param wareProduce
     * @return
     */
    WareProduce findWareProduce(WareProduce wareProduce);
}
